package com.qkbb.admin.kuibu.adapter;


import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

/**
 * Created by admin on 2016/2/5.
 */
public class FristPagerAdaPter extends android.support.v4.view.PagerAdapter{
    ImageView imageView[];

    public FristPagerAdaPter(ImageView[] imageView) {
        this.imageView = imageView;
    }

    @Override
    public int getCount() {
        return imageView.length;
    }

    @Override
    public boolean isViewFromObject(View view, Object object) {
        return view==object;
    }
    @Override
    public void destroyItem(ViewGroup view, int position, Object object) {
        view.removeView(imageView[position]);
    }

    @Override
    public Object instantiateItem(ViewGroup container, int position) {
        container.addView(imageView[position]);
        return imageView[position];
    }
}
